<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script>
          /*
        字符串： 引号
        */
        //1.特殊字符，用转义符
        
        let address = '郑\'州\n河南';
        console.log(address);

        //2.length 获取字符串的长度（有多少个字符）

        let hero = "德玛西亚";
        let lol = "wzry";
        console.log("hero 的长度是：" + hero.length);
        console.log("lol 的长度是：" + lol.length);

        //3. + 可以进行字符串的拼接

        let sub = 'h5';
        let sub1 = 'css';
        let result = 'h5' + 'css';
        let result1 = sub1 + sub;
        console.log(result, result1);

        //4. 字符串拼接其他数据类型后还是字符串

        let temp = sub + 123;
        console.log(typeof temp);

        //5. 字符串和变量拼接： 引引加加

        let game = '吃鸡';
        let game1 = '王者';
        let game2 = '打豆豆';
        let game3 = '造梦';
        console.log('吃鸡' + game1 + '打豆豆' + game3);

</script>
<body>
    
</body>
</html>

字符串： 引号

1.特殊字符，用转义符

let address = '郑\'州\n河南';
console.log(address);

2.length 获取字符串的长度（有多少个字符）

let hero = "德玛西亚";
let lol = "wzry";
console.log("hero 的长度是：" + hero.length);
console.log("lol 的长度是：" + lol.length);
3. + 可以进行字符串的拼接

let sub = 'h5';
let sub1 = 'css';
let result = 'h5' + 'css';
let result1 = sub1 + sub;
console.log(result, result1);
4. 字符串拼接其他数据类型后还是字符串

let temp = sub + 123;
console.log(typeof temp);

5. 字符串和变量拼接： 引引加加

let game = '吃鸡';
let game1 = '王者';
let game2 = '打豆豆';
let game3 = '造梦';
console.log('吃鸡' + game1 + '打豆豆' + game




字符串： 引号

1.特殊字符，用转义符

let address = '郑\'州\n河南';
console.log(address);

2.length 获取字符串的长度（有多少个字符）

let hero = "德玛西亚";
let lol = "wzry";
console.log("hero 的长度是：" + hero.length);
console.log("lol 的长度是：" + lol.length);

3. + 可以进行字符串的拼接

let sub = 'h5';
let sub1 = 'css';
let result = 'h5' + 'css';
let result1 = sub1 + sub;
console.log(result, result1);

4. 字符串拼接其他数据类型后还是字符串

let temp = sub + 123;
console.log(typeof temp);

. 字符串和变量拼接： 引引加加

let game = '吃鸡';
let game1 = '王者';
let game2 = '打豆豆';
let game3 = '造梦';
console.log('吃鸡' + game1 + '打豆豆' + game